import 'package:mobile_app.core/core/domain/entities/premium_access_status.dart';

abstract class IsExclusionFromLearningCardActionPermitted {
  bool call({
    required bool lexicalItemPermitted,
    required PremiumAccessStatus premiumAccessStatus,
  });
}

class IsExclusionFromLearningCardActionPermittedImpl
    implements IsExclusionFromLearningCardActionPermitted {
  const IsExclusionFromLearningCardActionPermittedImpl();

  @override
  bool call({
    required bool lexicalItemPermitted,
    required PremiumAccessStatus premiumAccessStatus,
  }) {
    return lexicalItemPermitted &&
        (premiumAccessStatus.hasFullAccess || premiumAccessStatus.isDemo);
  }
}
